using JTZY.Model.Agent;

namespace JTZY.Model.Agent
{
    /// <summary>
    /// 代理商订单记录表
    /// </summary>
    [SugarTable("corecmsagentorder")]
    public class Corecmsagentorder
    {
        /// <summary>
        /// 序列 
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 用户代理商id 
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 下单用户id 
        /// </summary>
        public long BuyUserId { get; set; }

        /// <summary>
        /// 订单编号 
        /// </summary>
        public string OrderId { get; set; }

        /// <summary>
        /// 结算金额 
        /// </summary>
        public decimal Amount { get; set; }

        /// <summary>
        /// 是否结算 
        /// </summary>
        public int IsSettlement { get; set; }

        /// <summary>
        /// 创建时间 
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 更新时间 
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 是否删除 
        /// </summary>
        public bool IsDelete { get; set; }

        [Navigate(NavigateType.OneToMany, nameof(Corecmsagentorderdetails.AgentOrderId), nameof(Id))] //自定义关系映射
        public List<Corecmsagentorderdetails> CorecmsagentorderdetailsNav { get; set; }

        [SugarColumn(IsIgnore =true)]
        public string UserName { get; set; }
    }
}